#ifndef __PORTAL_USER_H__
#define __PORTAL_USER_H__

#include "portal.h"

extern struct portal_user_s *portal_find_user(IPADDRTYPE ip, IPADDRTYPE6 *ipv6, int af);

extern struct portal_user_s *portal_find_user_by_id(char *sessionid);

extern void portal_make_sessionid(struct portal_user_s *user);

extern void portal_add_bindmac_user(uchar *mac, char *username, char *password);

extern bool portal_bindmac_get_userinfo(struct portal_user_s *portal_user);

extern bool portal_find_bindmac(uchar *mac);

extern void portal_bindmac_upd_userinfo(struct portal_user_s *portal_user);

extern void portal_del_user(struct portal_user_s *user);

#endif /* __PORTAL_USER_H__ */
